<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/vehicleState.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('vehicleState_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/vehicleState.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="vehiclePath_8h_source.html">vehiclePath.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="edgeGraph_8h_source.html">edgeGraph.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for vehicleState.h:</div>
<div class="dyncontent">
<div class="center"><img src="vehicleState_8h__incl.png" border="0" usemap="#includes_2vehicleState_8h" alt=""/></div>
<map name="includes_2vehicleState_8h" id="includes_2vehicleState_8h">
<area shape="rect" id="node3" href="vehiclePath_8h.html" title="vehiclePath.h" alt="" coords="57,83,159,112"/><area shape="rect" id="node17" href="edgeGraph_8h.html" title="edgeGraph.h" alt="" coords="200,237,296,267"/><area shape="rect" id="node7" href="edgeSol_8h.html" title="edgeSol.h" alt="" coords="68,160,148,189"/><area shape="rect" id="node11" href="edgeID_8h.html" title="edgeID.h" alt="" coords="51,237,125,267"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="vehicleState_8h__dep__incl.png" border="0" usemap="#includes_2vehicleState_8hdep" alt=""/></div>
<map name="includes_2vehicleState_8hdep" id="includes_2vehicleState_8hdep">
<area shape="rect" id="node3" href="add_8h.html" title="includes/add.h" alt="" coords="5,315,112,344"/><area shape="rect" id="node5" href="solution_8h.html" title="includes/solution.h" alt="" coords="424,160,555,189"/><area shape="rect" id="node16" href="remove_8h.html" title="includes/remove.h" alt="" coords="136,315,264,344"/><area shape="rect" id="node18" href="swap_8h.html" title="includes/swap.h" alt="" coords="643,315,757,344"/><area shape="rect" id="node25" href="operations_8h.html" title="includes/operations.h" alt="" coords="755,83,899,112"/><area shape="rect" id="node7" href="los_8h.html" title="includes/los.h" alt="" coords="237,237,339,267"/><area shape="rect" id="node10" href="stm_8h.html" title="includes/stm.h" alt="" coords="288,315,395,344"/><area shape="rect" id="node14" href="ltm_8h.html" title="includes/ltm.h" alt="" coords="381,469,483,499"/><area shape="rect" id="node20" href="graphbmp-tools_8h.html" title="includes/graphbmp&#45;tools.h" alt="" coords="464,237,637,267"/><area shape="rect" id="node12" href="LTMConfiguration_8h.html" title="includes/LTMConfiguration.h" alt="" coords="208,392,395,421"/></map>
</div>
</div>
<p><a href="vehicleState_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structVehicleState.html">VehicleState</a></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a36d831eb19032107e7c611f5c4d4abcc">Natural</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structVehicleState.html">VehicleState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a203f414020a972d3d39169acfddf33bf">VehicleState</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structVehicleState.html">VehicleState</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#aca817da33483cd8c23c0d84cd03f85d0">initVehicleState</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a20c0345a9b84df53838a6786526657e4">freeVehicleState</a> (<a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> state)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a8718d420b464015d303b5e0fa725365b">addEdgeToVehicleState</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="edgeGraph_8h.html#ae9263bc51f20141d45a0d487fbbb9985">PedgeGraph</a> pe, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs, bool g_ok)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a0bb50e9c63d5dcb3c4135e4cac88a053">addEdgeToVehicleStateForConnectionTest</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a58e2983fff8204bd3b7c51eb30bed237">removeEdgeFromVehicleStateForConnectionTest</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a70d99cdb5c9ce96f6e3dd30bdcfa0059">removeEdgeFromVehicleState</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="edgeGraph_8h.html#ae9263bc51f20141d45a0d487fbbb9985">PedgeGraph</a> pe, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs, bool g_ok)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a66a064e16b3df8517027dedeebe61e15">cloneVehicleState</a> (<a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pstate)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a065926aecb74256d3e5711a16816dd19">isConnected</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path, int lEdges)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#ac79b0ba984e6b07bbc8a4341290cb1cc">isConnectedRecursive</a> (int node, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a54ba977067ef5442b67513b14ed63097">printVehicleState</a> (FILE *f, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs, int k)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#a80cc2449e28835a0178eb7444e66b41c">printVehicleTQJScalars</a> (FILE *f, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehicleState_8h.html#ae5d1574a6d1d2e014991924bd11ed727">printVehicleAllScalars</a> (FILE *f, <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> pvs)</td></tr>
</table>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a36d831eb19032107e7c611f5c4d4abcc"></a><!-- doxytag: member="vehicleState.h::Natural" ref="a36d831eb19032107e7c611f5c4d4abcc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef unsigned int <a class="el" href="vehicleState_8h.html#a36d831eb19032107e7c611f5c4d4abcc">Natural</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a22da3b197204806711b0084dc72e971a"></a><!-- doxytag: member="vehicleState.h::PvehicleState" ref="a22da3b197204806711b0084dc72e971a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structVehicleState.html">VehicleState</a>* <a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a203f414020a972d3d39169acfddf33bf"></a><!-- doxytag: member="vehicleState.h::VehicleState" ref="a203f414020a972d3d39169acfddf33bf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structVehicleState.html">VehicleState</a>  <a class="el" href="structVehicleState.html">VehicleState</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a8718d420b464015d303b5e0fa725365b"></a><!-- doxytag: member="vehicleState.h::addEdgeToVehicleState" ref="a8718d420b464015d303b5e0fa725365b" args="(PedgeID pid, PedgeGraph pe, PvehicleState pvs, bool g_ok)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#a8718d420b464015d303b5e0fa725365b">addEdgeToVehicleState</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="edgeGraph_8h.html#ae9263bc51f20141d45a0d487fbbb9985">PedgeGraph</a>&#160;</td>
          <td class="paramname"><em>pe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>g_ok</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Aggiunge un nuovo arco percorso da un camion all'interno dello stato passato come parametro.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>edge non NULL </li>
<li>edge ha i&lt;j </li>
<li>pvs non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>l'arco e' all'interno del percorso del camion </li>
<li>il campo tau viene incrementato della quantita' e-&gt;t </li>
<li>il campo theta viene incrementato della quantita' e-&gt;d, se possibile </li>
<li>il campo jk viene incrementato della quantita' e-&gt;p, se possibile </li>
<li>la matrice G è aggiornata, se possibile</li>
</ul>
se possibile si riferisce alla situazione di G. difatti i controlli TQ sono altrove!!</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>identifica l'arco da aggiungere in lista </td></tr>
    <tr><td class="paramname">path</td><td>indica la lista che deve essere aggiornata </td></tr>
    <tr><td class="paramname">e</td><td>descrive l'arco da aggiungere alla lista. Contiene: <ul>
<li>t il tempo che viene consumato per attraversare l'arco 'id' </li>
<li>d la capacita' che può esser consumata per l'arco 'id' </li>
<li>p il profitto che può esser raccolto dall'arco 'id' </li>
</ul>
</td></tr>
    <tr><td class="paramname">k</td><td>l'identificativo del veicolo sul cui stato si sta operando. Necessario per un aggiornamento di <a class="el" href="structGMatrix.html">GMatrix</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0bb50e9c63d5dcb3c4135e4cac88a053"></a><!-- doxytag: member="vehicleState.h::addEdgeToVehicleStateForConnectionTest" ref="a0bb50e9c63d5dcb3c4135e4cac88a053" args="(PedgeID pid, PvehicleState pvs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#a0bb50e9c63d5dcb3c4135e4cac88a053">addEdgeToVehicleStateForConnectionTest</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Metodo da richiamare per modificare uno state prima di testarne la connettività. Opera ristrettamente sui campi di <a class="el" href="structVehicleState.html">VehicleState</a>, in particolare modifica solamente vehiclePath e lEdges. <b>Non deve essere quindi utilizzato</b> per aggiungere archi nella normale soluzione poiche' non vengono aggiornati altri valori fondamentali (come la gMatrix per esempio).</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pid non NULL </li>
<li>pid validato correttamente </li>
<li>pvs non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>all'interno della struttura pvp di pvs e' comparsa una percorrenza dell'arco pid in piu' rispetto a prima di questa chiamata</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pid</td><td>l'arco da aggiungere </td></tr>
    <tr><td class="paramname">pvs</td><td>il percorso del camion da aggiungere </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a66a064e16b3df8517027dedeebe61e15"></a><!-- doxytag: member="vehicleState.h::cloneVehicleState" ref="a66a064e16b3df8517027dedeebe61e15" args="(PvehicleState pstate)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> <a class="el" href="vehicleState_8h.html#a66a064e16b3df8517027dedeebe61e15">cloneVehicleState</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pstate</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>genera una nuova istanza di <a class="el" href="structVehicleState.html">VehicleState</a> uguale a quella passata come parametro. I campi vengono copiati in conformita' a questa tabella:</p>
<table class="doxtable">
<tr>
<th>Campo </th><th>copia per...  </th></tr>
<tr>
<td>pvp </td><td>fisica  </td></tr>
<tr>
<td>tau </td><td>fisica  </td></tr>
<tr>
<td>theta </td><td>fisica  </td></tr>
<tr>
<td>jk </td><td>fisica  </td></tr>
<tr>
<td>lEdges </td><td>fisica  </td></tr>
<tr>
<td>lNodes </td><td>fisica  </td></tr>
<tr>
<td>pathSize </td><td>fisica  </td></tr>
</table>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pstate non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una istanza di <a class="el" href="structVehicleState.html">VehicleState</a> viene allocata in memoria. La sua deallocazione deve essere <b>manuale</b></li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>lo stato da copiare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore ad un'istanza di vehicleState in memoria uguale a tutto per tutto all'originale </dd></dl>

</div>
</div>
<a class="anchor" id="a20c0345a9b84df53838a6786526657e4"></a><!-- doxytag: member="vehicleState.h::freeVehicleState" ref="a20c0345a9b84df53838a6786526657e4" args="(PvehicleState state)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#a20c0345a9b84df53838a6786526657e4">freeVehicleState</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>dealloca dalla memoria lo state</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>state non e' NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>viene deallocata la memoria occupata da <a class="el" href="structVehiclePath.html">VehiclePath</a> nonche' dagli altri campi di <a class="el" href="structVehicleState.html">VehicleState</a>.</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>lo stato da deallocare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aca817da33483cd8c23c0d84cd03f85d0"></a><!-- doxytag: member="vehicleState.h::initVehicleState" ref="aca817da33483cd8c23c0d84cd03f85d0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a> <a class="el" href="vehicleState_8h.html#aca817da33483cd8c23c0d84cd03f85d0">initVehicleState</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Inizializza uno stato vergine, con un percorso nullo e dei campi cache pari a zero. </p>

</div>
</div>
<a class="anchor" id="a065926aecb74256d3e5711a16816dd19"></a><!-- doxytag: member="vehicleState.h::isConnected" ref="a065926aecb74256d3e5711a16816dd19" args="(PvehiclePath p_path, int lEdges)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="vehicleState_8h.html#a065926aecb74256d3e5711a16816dd19">isConnected</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lEdges</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>determina se il percorso passato e' connesso oppure e' disconnesso.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non e' NULL </li>
<li></li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">il</td><td>path da controllare </td></tr>
    <tr><td class="paramname">la</td><td>lunghezza del path in numero di archi attraversati. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se il percorso e' connesso, FALSE altrimenti </dd></dl>

</div>
</div>
<a class="anchor" id="ac79b0ba984e6b07bbc8a4341290cb1cc"></a><!-- doxytag: member="vehicleState.h::isConnectedRecursive" ref="ac79b0ba984e6b07bbc8a4341290cb1cc" args="(int node, PvehiclePath p_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="vehicleState_8h.html#ac79b0ba984e6b07bbc8a4341290cb1cc">isConnectedRecursive</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae5d1574a6d1d2e014991924bd11ed727"></a><!-- doxytag: member="vehicleState.h::printVehicleAllScalars" ref="ae5d1574a6d1d2e014991924bd11ed727" args="(FILE *f, PvehicleState pvs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#ae5d1574a6d1d2e014991924bd11ed727">printVehicleAllScalars</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a54ba977067ef5442b67513b14ed63097"></a><!-- doxytag: member="vehicleState.h::printVehicleState" ref="a54ba977067ef5442b67513b14ed63097" args="(FILE *f, PvehicleState pvs, int k)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#a54ba977067ef5442b67513b14ed63097">printVehicleState</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Richiama printVehiclePath e vi appende i valori di tau e di theta.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>f aperto in scrittura </li>
<li>pvs non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>f modificato</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il file su cui stampare </td></tr>
    <tr><td class="paramname">pvs</td><td>il percorso del camion da stamapre </td></tr>
    <tr><td class="paramname">k</td><td>il numero del camion che compie il percorso </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a80cc2449e28835a0178eb7444e66b41c"></a><!-- doxytag: member="vehicleState.h::printVehicleTQJScalars" ref="a80cc2449e28835a0178eb7444e66b41c" args="(FILE *f, PvehicleState pvs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#a80cc2449e28835a0178eb7444e66b41c">printVehicleTQJScalars</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a70d99cdb5c9ce96f6e3dd30bdcfa0059"></a><!-- doxytag: member="vehicleState.h::removeEdgeFromVehicleState" ref="a70d99cdb5c9ce96f6e3dd30bdcfa0059" args="(PedgeID pid, PedgeGraph pe, PvehicleState pvs, bool g_ok)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="vehicleState_8h.html#a70d99cdb5c9ce96f6e3dd30bdcfa0059">removeEdgeFromVehicleState</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="edgeGraph_8h.html#ae9263bc51f20141d45a0d487fbbb9985">PedgeGraph</a>&#160;</td>
          <td class="paramname"><em>pe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>g_ok</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rimuove UNA percorrenza dell'arco specificato dallo stato del camion.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>edge non NULL </li>
<li>edge ha i&lt;j </li>
<li>pvs non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>l'arco e' all'interno del percorso del camion </li>
<li>il campo tau viene decrementato della quantita' e-&gt;t </li>
<li>il campo theta viene decrementato della quantita' e-&gt;d, se possibile </li>
<li>il campo jk viene decrementato della quantita' e-&gt;p, se possibile </li>
<li>la matrice G è aggiornata, se possibile</li>
</ul>
se possibile si riferisce alla situazione di G.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>identifica l'arco da rimuovere in lista </td></tr>
    <tr><td class="paramname">path</td><td>indica la lista che deve essere aggiornata </td></tr>
    <tr><td class="paramname">e</td><td>descrive l'arco da rimuovere dalla lista. Contiene: <ul>
<li>t il tempo che viene consumato per attraversare l'arco 'id' </li>
<li>d la capacita' che può esser consumata per l'arco 'id' </li>
<li>p il profitto che può esser raccolto dall'arco 'id' </li>
</ul>
</td></tr>
    <tr><td class="paramname">g_ok</td><td>TRUE se il camion raccoglieva il nodo, FALSE altrimenti </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>il numero di volte che l'arco edge viene percorso dopo aver eseguito questa funzione </dd></dl>

</div>
</div>
<a class="anchor" id="a58e2983fff8204bd3b7c51eb30bed237"></a><!-- doxytag: member="vehicleState.h::removeEdgeFromVehicleStateForConnectionTest" ref="a58e2983fff8204bd3b7c51eb30bed237" args="(PedgeID pid, PvehicleState pvs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehicleState_8h.html#a58e2983fff8204bd3b7c51eb30bed237">removeEdgeFromVehicleStateForConnectionTest</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehicleState_8h.html#a22da3b197204806711b0084dc72e971a">PvehicleState</a>&#160;</td>
          <td class="paramname"><em>pvs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Metodo da richiamare per modificare uno state prima di testarne la connettività. Opera ristrettamente sui campi di <a class="el" href="structVehicleState.html">VehicleState</a> ed in particolare modifica solamente vehiclePath e lEdges. La funzione <b>non deve essere quindi utilizzata</b> per togliere archi dalla normale soluzione poiche' non vengono aggiornati altri valori fondamentali (come la gMatrix per esempio).</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>pid indica un edgeID che è presente nel path associato allo state. </li>
<li>pid validato </li>
<li>pvs non NULL</li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>all'interno del campo pvp di pvs l'arco pid viene percorso una volta in meno rispetto a prima di questa chiamata a funzione</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pid</td><td>l'arco da togliere </td></tr>
    <tr><td class="paramname">pvs</td><td>il percorso del camion da modificare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="vehicleState_8h.html">vehicleState.h</a>      </li>

    <li class="footer">Generated on Thu Jun 27 2013 11:34:37 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
